class Animal {
    public int age;
    public String name;

}
class Cat extends Animal {
    public void act() {
        System.out.println(name + "miaomiao");
    }
}
public class Test {
    public static Animal func(String s) {
        return new Cat();
    }
    public static void main(String[] args) {
        //Animal animal = new Cat();
//        func(new Cat());
        Animal animal = func("猫");
    }
}
